#include <stdio.h>
#include <stdlib.h>

#define ROW_COUNT 3
#define COL_COUNT 4
int main(int argc, char *argv[]) {
  /* 如何定义一个指针数组
   */
  int r1[] = {1, 2, 3, 4};
  int r2[] = {5, 6, 7, 8};
  int r3[] = {9, 10, 11, 12};
  // 定义一个指针数组，保存三个一维数组的地址
  int *p[ROW_COUNT] = {r1, r2, r3};
  for (int i = 0; i < ROW_COUNT; i++) {
    /* for (int *q = p[i]; q < p[i] + COL_COUNT; q++) {
      printf("%d\t", *q);
    } */
    for (int j = 0; j < COL_COUNT; j++) {
      printf("%d\t", p[i][j]);
    }
  }
  return EXIT_SUCCESS;
}
